import { http } from '@/axios'

/**
 * @description 套餐列表
 */
export function planList() {
  return http.request({
    url: '/plans/list',
    method: 'GET',
  })
}

/**
 * @description 微信支付
 */
export function wechatBuy(data) {
  return http.request({
    url: '/pay/wx/createOrder',
    method: 'POST',
    data,
  })
}

/**
 * @description 支付宝支付
 */
export function alipay(data) {
  return http.request({
    url: '/pay/alipay/createOrder',
    method: 'POST',
    data,
  })
}

/**
 * @description 检测订单是否支付
 */
export function checkOrder(data) {
  return http.request({
    url: '/orders/check',
    method: 'GET',
    params: data,
  })
}
